]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
objectManager: correct other invalid index code in onNameVanished
authorRay Strode <rstrode@redhat.com>
Fri, 31 Aug 2018 16:48:00 +0000 (12:48 -0400)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 3 Sep 2018 22:40:46 +0000 (22:40 +0000)
The object manager tries to synthesize interface removal
events if the bus name of a remote object drops off the bus.

The code had bad typos in it, though: it reuses the `i`
index variable in its inner loop, where it should be using
the `j` index variable.

This commit corrects the i/j confusion.

js/misc/objectManager.js

index 134887491e7ae74e8d0fc3481747df87a63b6a6a..a1b7eb9d2bd2a15795dd225ee9823f6afaa12e7a 100644 (file)
@@ -241,8 +241,8 @@ var ObjectManager = new Lang.Class({
             let object = this._objects[objectPath];
 
             let interfaceNames = Object.keys(object);
-            for (let j = 0; i < interfaceNames.length; i++) {
-                let interfaceName = interfaceNames[i];
+            for (let j = 0; j < interfaceNames.length; j++) {
+                let interfaceName = interfaceNames[j];
 
                 if (object[interfaceName])
                     this._removeInterface(objectPath, interfaceName);